package com.cloudlead.plugin.scheduler.entity;

import com.cloudlead.common.lang.persistence.AbstractIdEntity;

import com.cloudlead.common.persistence.UpdateCheck;

import javax.validation.constraints.Size;
import java.lang.Long;

import com.cloudlead.common.lang.annotation.Label;

import java.lang.String;
import javax.validation.constraints.NotNull;

/**
 * EScheduleJob is a Querydsl bean type
 */
@Label("计划任务")
public class EScheduleJob extends AbstractIdEntity<String> {

    private static final long serialVersionUID = 289731705540173L;
    @Size(max = 255)
    @Label("调度表达式")
    private String cron;

    @Label("完成时间")
    private Long endTime;

    @Size(max = 65535)
    @Label("执行内容")
    @NotNull
    private String exec;

    @Size(max = 11)
    @Label("执行类型")
    @NotNull
    private String execType;

    @Size(max = 24)
    @Label("编号")
    @NotNull(groups = {UpdateCheck.class})
    private String id;

    @Size(max = 255)
    @Label("工作任务名称")
    @NotNull
    private String name;

    @Label("开始时间")
    private Long startTime;

    @Size(max = 12)
    @Label("任务状态")
    private String status;

    @Size(max = 255)
    @Label("用户")
    private String username;

    public String getCron() {
        return cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public String getExec() {
        return exec;
    }

    public void setExec(String exec) {
        this.exec = exec;
    }

    public String getExecType() {
        return execType;
    }

    public void setExecType(String execType) {
        this.execType = execType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String toString() {
        return String.format("EScheduleJob { cron : %s,endTime : %s,exec : %s,execType : %s,id : %s,name : %s,startTime : %s,status : %s,username : %s }", cron, endTime, exec, execType, id, name, startTime, status, username);
    }

}

